<%@page import="com.zretc.news.entity.NewsType"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">

<title>Dashboard Template for Bootstrap</title>

<!--1. Bootstrap core CSS -->
<link href="dist/css/bootstrap.min.css" rel="stylesheet">
<!--2. Custom styles for this template -->
<link href="css/dashboard.css" rel="stylesheet">

</head>
<body>

	<jsp:include page="nav.html"></jsp:include>

	<div class="container-fluid">
		<div class="row">
			<div class="col-sm-3 col-md-2 sidebar">
				<ul class="nav nav-sidebar">
					<li class="active"><a href="NewsTypeServlet">新闻类型表 <span class="sr-only">(current)</span></a></li>
					<li><a href="addtype.jsp">新增类型</a></li>
					<li ><a href="addusers.jsp">新增用户</a></li>
				</ul>

			</div>
			<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
				<%
					List<NewsType> list = null;
					if (request.getAttribute("list") != null) {
						list = (List<NewsType>) request.getAttribute("list");
					}
				%>

				<h2 class="sub-header">
					新闻类型列表

					<form class="navbar-form navbar-right" action="NewsTypeServlet"
						method="post">
						<input type="text" class="form-control" name="keywords"
							placeholder="关键字"> <input type="submit"
							class="btn btn-primary" value="查询">
					</form>

				</h2>
				<div class="table-responsive">
					<table class="table table-striped">
						<thead>
							<tr>
								<th>编号</th>
								<th>类型名称</th>
								<th>备注</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>

							<%
								if (list != null) {
									for (NewsType newstype : list) {
							%>


							<tr>
								<td>${newstype.typeid}</td>
								<td><%=newstype.getTypename()%></td>
								<td><%=newstype.getTyperemark()%></td>
								<td><a href="#">修改</a> | <a href="#" >删除</a></td>
								
							</tr>
							<%
								}
								}
							%>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>

	<!-- Bootstrap core JavaScript
    ================================================== -->
	<!--3 - js/jquery-2.0.3.js -->
	<script src="js/jquery-2.0.3.js"></script>
	<!--4 - ootstrap.min.js -->
	<script src="dist/js/bootstrap.min.js"></script>

</body>
</html>
